package com.yic.module.device.controller.admin.inspectionPlan.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static com.yic.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 巡检计划 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class InspectionPlanBaseVO {

    @Schema(description = "计划名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划名称不能为空")
    private String name;

    @Schema(description = "计划状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划状态不能为空")
    private Integer status;

    @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "开始日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime startDate;

    @Schema(description = "结束日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "结束日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime endDate;

    @Schema(description = "计划周期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划周期不能为空")
    private String cycle;

    @Schema(description = "计划类型", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划类型不能为空")
    private Integer type;

    @Schema(description = "提醒时间(时)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "提醒时间(时)不能为空")
    private BigDecimal reminderTime;

    @Schema(description = "预计用时(时)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "预计用时(时)不能为空")
    private BigDecimal estimatedTime;

    @Schema(description = "计划人员ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划人员ID不能为空")
    private Long userId;

    @Schema(description = "备注")
    private String remark;

}
